<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>广东穗智律师事务所</title>
    <meta name="description" content="联系我们">
    <meta name="keywords" content="穗智 联系我们">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="images/logo.ico">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.7.2/css/amazeui.min.css"/>
    <link rel="stylesheet" href="assets/css/admin.css">
    <link rel="stylesheet" href="assets/css/suit.css">
</head>
<style>
    body {
        font-size: 13px;
    }

    .nav {
        font-size: 20px;
    }

    .am-topbar-nav > li > a {
        color: #000;
        line-height: 1.6;
        padding: 5px 10px;
    }

    .border-line > li {
        border-left: 1px solid #000;

    }

    .am-nav-pills > li + li {
        margin: 0;
    }

    .border-line {
        border-right: 1px solid #000;
    }

    .am-u-md-12 {
        margin: 5px;
    }

    header div img:hover {
        background-color: #EFEDEF;
    }

    .nav-justify > li {
        float: none;
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        -ms-flex: 1;
        flex: 1;
    }

    .nav-justify > li > a {
        text-align: center;
        margin-bottom: 0;
    }

    .nav-justify {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
    }
</style>
<body>
<header class="am-topbar am-text-center am-show-sm-only" style="margin-bottom:0">

    <div class="am-u-lg-5 am-u-md-4 am-u-sm-8 am-text-center am-u-md-push-1">
        <a href="index.html"><img src="images/logo-sz.png" style="max-height: 60px;"></a>
    </div>
    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
            data-am-collapse="{target: '#doc-collapse'}"><span class="am-sr-only">导航切换</span> <span
            class="am-icon-bars"></span>
    </button>

    <div class="am-show-sm-only">
        <div class="am-collapse am-topbar-collapse" id="doc-collapse" style="padding:0 10%">
            <ul class="am-nav am-nav-pills am-topbar-nav nav">
                <li><a href="profile.html">律所概况</a></li>
                <li><a href="case.html">成功案例</a></li>
                <li><a href="team.html">穗智团队</a></li>
                <li><a href="message.html">在线咨询</a></li>
                <li class="am-active"><a href="contact.html">联系我们</a></li>
            </ul>
        </div>
    </div>

    <div style="font-size: 10px;padding: 10px 9%;"
         class="am-text-left am-u-lg-5 am-u-md-4 am-u-sm-4 am-u-md-push-1 am-hide-sm-only">
        <div>
            地址：广州市海珠区广州大道南448号财智大厦901室
        </div>
        <div>
            电话：<a href="tel:020-28022100">020-28022100</a>
        </div>
    </div>
</header>

<div class="am-padding-0">
    <img src="images/other.jpg" class="am-u-sm-12 am-u-md-12 am-padding-0" style="margin: 0">
</div>
<div class="am-u-md-12">
    <br>
</div>
<div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse" style="padding:0 10%">
    <ul class="am-nav am-nav-pills am-topbar-nav nav am-u-md-8 am-u-md-push-2 am-u-md-pull-2 nav-justify border-line">
        <li><a href="index.html">首页<br>
            <div style="font-size: 8px;margin: 0;padding: 0">Home</div>
        </a></li>
        <li><a href="profile.html">律所概况<br>
            <div style="font-size: 8px;margin: 0;padding: 0">About Us</div>
        </a></li>
        <li><a href="case.html">成功案例<br>
            <div style="font-size: 8px;margin: 0;padding: 0">Successful Case</div>
        </a></li>
        <li><a href="team.html">穗智团队<br>
            <div style="font-size: 8px;margin: 0;padding: 0">Team Introduce</div>
        </a></li>
        <li><a href="message.html">在线咨询<br>
            <div style="font-size: 8px;margin: 0;padding: 0">Consultation</div>
        </a></li>
        <li><a href="contact.html">联系我们<br>
            <div style="font-size: 8px;margin: 0;padding: 0">Contact Us</div>
        </a></li>
    </ul>
</div>
<br>
<br>
<div class="am-tabs am-u-md-10 am-u-md-push-1">
    <div class="am-u-md-3 am-u-md-push-1 am-u-lg-2 am-u-lg-push-2" style="padding: 0">
        <div class="am-padding-top-0">
            <strong class="am-text-default am-text-xl">联系我们</strong>
        </div>
    </div>
    <div class="am-u-md-7 am-u-md-pull-1 am-u-lg-6 am-u-lg-pull-2" style="padding:10px 23px 16px">
        <strong class="am-text-default am-text-lg ">穗智地址</strong>
        <br> <br>

        <!--以下注释不能删！！！！-->
        <div id="content">
            <!-- <div class="am-u-md-12" style="margin:0;padding:0;margin-bottom:5px">
                <div id="container${i}" class="am-u-md-7" style="min-height:300px;border: 1px #1d1d1d solid">
                </div>
                <div class="am-u-md-5 am-padding-top-xl">
                    <div class="name">${name}</div>
                    <div class="address">地址：${address}</div>
                    <div>电话：${phone}</div>
                </div>
            </div>
            <br> -->
        </div>
    </div>
</div>

<footer data-am-widget="footer"
        class="am-footer am-footer-default am-u-sm-12"
        data-am-footer="{  }" style="position:relative;bottom: 0">
    <hr>
    <div style="font-size: 10px;">
        <div>
            地址：广州市海珠区广州大道南448号财智大厦901室
        </div>
        <div>
            电话：<a href="tel:020-28022100">020-28022100</a>
        </div>
    </div>
    <div class="am-footer-miscs ">
        <p>CopyRight©2016 suizhilaw</p>
        <p>粤ICP备16096850号</p>
    </div>
</footer>
<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>

<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<!--<![endif]-->
<script src="http://cdn.amazeui.org/amazeui/2.7.2/js/amazeui.min.js"></script>
<script src="assets/js/app.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>
<script>
    var content = $("#content").html().trim().substring(4).replace("-->", "");

    //ajax封装
    function ajax(url, data, success, error, type_) {
        if (type_ == "") type_ = 'post';
        $.ajax({
            type: type_,
            data: data,
            url: url,
            dataType: 'json',
            contentType: "application/json",
            success: function (d) {
                success(d);
            },
            error: function (e) {
                error(e);
            }
        });
    }

    /*ajax成功填充页面*/
    function appenMessage(data) {
        var contact = data.contact;
        $("#content").html("");
        for (var i = 0; i < contact.length; i++) {
            $("#content").append(appenContent(content, contact[i], i));
            init("container" + i);
        }
    }

    function appenContent(content, data, i) {
        for (var key in data) {
            content = content.replace("${" + key + "}", (data[key] == null) ? "" : data[key]);
            content = content.replace("${i}", i);
        }
        return content;
    }

    function error(e) {
        console.error(e);
        alert("网页遇到了点错误，不如刷新试试☺");
        $("#tip").html('<i class="am-icon-close">获取数据失败，请刷新重试！');
    }


    ajax("view/index.action", "", appenMessage, error, "get");

</script>
<script>

    var init = function (cont) {
        // 百度地图API功能
        var map = new BMap.Map(cont);
        var point = new BMap.Point(113.321275, 23.102516);
        map.centerAndZoom(point, 20);

        // 创建地址解析器实例
        var myGeo = new BMap.Geocoder();
        // 将地址解析结果显示在地图上,并调整地图视野
        var address = $("#" + cont).parent().find("div.address").html().substring(3);
        var name = $("#" + cont).parent().find("div.name").html();
        myGeo.getPoint(address, function (point) {
            if (point) {
                map.centerAndZoom(point, 20);
                map.addOverlay(new BMap.Marker(point));

                var marker = new BMap.Marker(point);  // 创建标注
                map.addOverlay(marker);              // 将标注添加到地图中
                var label = new BMap.Label(name, {offset: new BMap.Size(20, -10)});
                marker.setLabel(label);

            } else {
                console.error("您选择地址没有解析到结果!");
            }
        }, "广州市");

//添加地图类型和缩略图
        map.addControl(new BMap.MapTypeControl({mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP]}));          //2D图，卫星图
        map.setCurrentCity("广州");        //由于有3D图，需要设置城市哦

        //添加控件和比例尺
        map.addControl(new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT}));// 左上角，添加比例尺
        map.addControl(new BMap.NavigationControl());//左上角，添加默认缩放平移控件

    }

</script>
</body>
</html>
